// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueRouter from 'vue-router'
import {routerMode} from './config/env'
import routes from './router'
import 'bootstrap'
import "../static/css/bootstrap.css"
import elementui from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from "axios"
import store from './store'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.config.productionTip = false
Vue.use(elementui)
Vue.use(VueRouter)
Vue.prototype.$axios = axios
const router = new VueRouter(
  {
    routes,
    mode: routerMode
  }
)

new Vue({
  router,
  store,
  axios
}).$mount("#app")
